home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 122_01 / pistol.hlp < prev    next >
Text File  |  1985-08-19  |  7KB  |  322 lines

  1. HELP MENU FOR PISTOL 2.0 (Feb 26, 1983):
  2. Copyright (C) 1983 by E. E. Bergmann
  3. INTRODUCTION
  4. GETTING STARTED
  5. TUTORIAL    ['TUTORIAL HELP]
  6. GLOSSARY
  7. EXTRAS(ENHANCEMENTS TO "STANDARD PISTOL")
  8. :
  9. ::
  10. *********************************************************
  11. *                            *
  12. * PISTOL-Portably Implemented Stack Oriented Language   *
  13. *            Version 2.0            *
  14. * (C) 1983 by    Ernest E. Bergmann            *
  15. *        Physics, Building #16            *
  16. *        Lehigh Univerisity            *
  17. *        Bethlehem, Pa. 18015            *
  18. *                            *
  19. * Permission is hereby granted for all reproduction and *
  20. * distribution of this material provided this notice is *
  21. * included.                        *
  22. *                            *
  23. *********************************************************
  24. :
  25. ::
  26.     PISTOL is a Portably Implemented Stack Oriented
  27. Language that has been developed for general use and
  28. experimentation. It is at an early developmental stage and so
  29. may have lots of "bugs". I would appreciate any comments and
  30. suggestions.  For the DEC-20, it has been implemented in
  31. PASCAL;  for CP/M, it has been implemented with the BD Software
  32. C compiler v1.45a.
  33.  
  34.     PISTOL resembles an HP calculator in many ways.  It
  35. uses a (parameter) stack to pass numbers between routines.  The
  36. language is "RPN", that is Reverse Polish Notation.  At
  37. present, all arithmetic is performed in integer form.  This
  38. language was inspired by and has evolved from two mini- and
  39. micro- based languages, FORTH (Charles Moore, 1970) and STOIC
  40. (MIT and Harvard Biomedical Engineering Center, 1977).
  41. :
  42. ::
  43. GETTING STARTED:
  44.     This is how to bring PISTOL "up":
  45.  
  46. type
  47.     DIR CORE2 to see if this file exists, otherwise, type
  48.     DIR PBASE2 to make sure this file exists.
  49.  
  50.  
  51. type either:
  52.     PISTOL    (for CP/M)
  53. or
  54. (for the DEC-20):
  55.     EXE PISTOL.PAS
  56. link TTY: to the input.
  57.  
  58.     PISTOL should come up with:
  59.  
  60. ***PISTOL 2.0***
  61. X>
  62.  
  63.     To make it smarter, it can be "educated" with a set of
  64. useful definitions already prepared in a file named, CORE2 or
  65. PBASE2 ; to do this type:
  66.  
  67. X> 'CORE2 RESTORE    (only if CORE2 exists!)
  68. or
  69. ==
  70.  
  71. X> 'PBASE2 LOAD        (if PBASE2 exists; this is much slower)
  72. X> 'CORE2 COREDUMP    (creates CORE2 for future use)
  73. :
  74. ::
  75.  
  76.     There is a tutorial file, TUTORIAL,
  77. which may be on this system. To read
  78. portions of it from within PISTOL, type:
  79.  
  80. X> 'TUTORIAL HELP
  81.  
  82. Alternatively, you may exit PISTOL by typing:
  83.  
  84. X> BYE
  85.  
  86. and the type out the file directly.
  87.  
  88. :
  89. GLOSSARY SUBMENU(ASSUMES PBASE2 HAS BEEN USED!):
  90. explanations of TOS,NTT,TFT,FFT
  91. ARITHMETIC OPERATORS        ['ARITH HELP]
  92. LOGICAL OPERATORS        ['LOGIC HELP]
  93. STACK RELATED            ['STACK HELP]
  94. DEFINITIONAL            ['DEFS HELP]
  95. MEMORY RELATED            ['MEMOPS HELP]
  96. SYSTEM VARIABLES        ['SYSVARS HELP]
  97. SYSTEM CONSTANTS        ['SYSCONS HELP]
  98. I/O OPERATIONS            ['IO HELP]
  99. EDITOR                ['EDITOR HELP]
  100. ITERATION AND CONDITIONAL    ['ITCOND HELP]
  101. VOCABULARY RELATED        ['VOCAB HELP]
  102. MISCELLANEOUS AIDS        ['MISC HELP]
  103. ::
  104. :::
  105.  
  106.     TOS - "Top Of Stack"
  107.  
  108.     NNT - "Next To Top" of stack
  109.  
  110.     TFT - "Third From Top" of stack
  111.  
  112.     FFT - "Fourth From Top" of stack
  113.  
  114. ::
  115. :::
  116. PISTOL'S ARITHMETIC OPERATORS:
  117.  
  118. /    NTT TOS --> NTT/TOS
  119.  
  120. /MOD    NTT TOS --> (NTT/TOS) (NTT MOD TOS), see MOD
  121.  
  122. *    NTT TOS --> NTT*TOS
  123.  
  124. +    NTT TOS --> NTT+TOS
  125.  
  126. -    NTT TOS --> NTT-TOS
  127.  
  128. 1+    TOS --> TOS+1
  129.  
  130. 1+W!    TOS -->
  131.     Increments word location pointed to by TOS by 1.
  132.  
  133. 1-    TOS --> TOS-1
  134.  
  135. 3W-    TOS --> TOS-3*W
  136.  
  137. ABS    TOS -->ABS(TOS)
  138.  
  139. MAX    NTT TOS --> MAX(NTT,TOS), signed comparisons
  140.  
  141. MIN    NTT TOS --> MIN(NTT,TOS), signed comparisons
  142.  
  143. MINUS    TOS --> -TOS
  144.  
  145. MOD    NTT TOS --> (NTT MOD TOS), sign from NTT
  146.     examples: 1234 10 --> 4
  147.         -1234 10 --> -4
  148.         1234 -10 --> 4
  149.         -1234 -10 --> -4
  150.  
  151. TRANS    TOS --> USER+W*TOS
  152.  
  153. TRANS@    'TRANS@ : TRANS @ ;
  154.  
  155. USER+    TOS --> TOS+USER
  156.  
  157. W*    TOS --> TOS*W
  158.  
  159. W+    TOS --> TOS+W
  160.  
  161. W+W!    TOS -->
  162.     Increments word location pointed to by TOS by W.
  163.  
  164. W-    TOS --> TOS-W
  165.  
  166. ::
  167. :::
  168. To obtain definitions for the logical operators:
  169.  
  170. .. EQ EQZ FALSE GE GT GTZ LAND LE LNOT
  171. LOR LT LTZ OFF ON TRUE    
  172.  
  173. type:
  174.  
  175. X> 'LOGIC HELP
  176. ::
  177. :::
  178. STACK OPERATORS:
  179. .V 2OVER 3OVER <R > CASE@ CHKLMT DDUP
  180. DUP L@ LSIZE PISTOL< R@ R> RP RSIZE
  181. RSTACK S@ SP SSIZE STACK SYNTAXBASE
  182. UNDER UNLINKED< VSIZE    
  183.  
  184. to get definitions, type: 
  185.  
  186. X> 'STACK HELP
  187.  
  188. ::
  189. :::
  190. THE DEFINITIONAL OPERATORS:
  191. ARRAY
  192. BRANCH
  193. CONSTANT
  194. VARIABLE
  195.  :  ... ;
  196. $: ... ;$
  197.  
  198. are described in more detail in the file, DEFS:
  199.  
  200. X> 'DEFS HELP
  201.  
  202. ::
  203. :::
  204. definitions for the
  205. MEMORY RELATED OPERATORS:
  206.  
  207. 1+W! ? C! C@ COMPBUF EDITBUF LINEBUF OFF
  208. ON RAMMAX RAMMIN READ-PROTECT STRINGSMAX
  209. STRINGSMIN TRANS TRANS@ USER USER+ W W!
  210. W* W+ W+W! W<- W@ WRITE-PROTECT
  211.  
  212. are obtained by typing:
  213.  
  214. X> 'MEMOPS HELP
  215.  
  216. ::
  217. :::
  218. definitions of the SYSTEM VARIABLES:
  219.  
  220. #GET-ADDR #LINES (PISTOL<) (UNLINKED<)    
  221. .C .D .V ABORT-PATCH BRANCH-LIST COLUMN
  222. COMPILE-END-PATCH CONSOLE CONVERT-PATCH
  223. CURRENT CURRENT-EOSTRINGS ECHO
  224. INPUTFILE-STATUS INFILE LIST NEXTCH^
  225. OLD-EOSTRINGS OLDLINE# OUTPUT-STATUS
  226. PREVIOUS PROMPT-PATCH RADIX
  227. RADIX-INDICATOR RAISE SYNTAXBASE
  228. TAB-SIZE TERMINAL-PAGE TERMINAL-WIDTH
  229. TRACE-ADDR TRACE-LEVEL    
  230.  
  231. are obtained by:
  232.  
  233. X> 'SYSVARS HELP
  234.  
  235. ::
  236. :::
  237. definitions of SYSTEM CONSTANTS:
  238.  
  239. A' CHKLMT COMPBUF CSIZE EDITBUF FALSE
  240. LINEBUF LSIZE MAXINT MAXLINNO MAXORD
  241. MININT NEWLINE Q' RAMMAX RAMMIN
  242. READ-PROTECT RSIZE SAFE-END SSIZE
  243. STRINGSMAX STRINGSMIN TRUE USER VBASE
  244. VERSION VMAX VSIZE W WRITE-PROTECT
  245.  
  246. are obtained by:
  247.  
  248. X> 'SYSCONS HELP
  249.  
  250. ::
  251. :::
  252. I/O OPERATIONS:
  253.     There is a seperate "help" file that describes words
  254. related to I/O operations.  To use it type:
  255.  
  256. X> 'IO HELP
  257.  
  258. ::
  259. :::
  260. EDITOR:
  261.     (Line numbers change with the editing
  262.     process, the first line in the file is
  263.     numbered 1, the next, 2, etc.)
  264.  
  265.     Type:
  266.  
  267. X> 'EDITOR HELP
  268.  
  269. to get the definitions for:
  270.  
  271. DELETE DELETES FINISH INPUT LI LISTALL NEWF
  272. OPENR OPENW READ REPLACE WRITE    
  273.  
  274. ::
  275. :::
  276. ITERATION AND CONDITIONAL:
  277.  
  278.     For more details on iteration (BEGIN ... END,
  279. BEGIN..IF..REPEAT, DO..LOOP, DO..n +LOOP) and on
  280. conditionals (IF..[ELSE]..THEN, "case" construction,
  281. and recursion), type:
  282.  
  283.     X> 'ITCOND HELP
  284.  
  285. ::
  286. :::
  287. The command,
  288.  
  289. X> 'VOCAB HELP
  290.  
  291. will provide information on the use of:
  292.  
  293. (PISTOL<) (UNLINKED<) .V > ADDRESS BLIST
  294. BRANCH CURRENT DEFINITIONS FENCE FIND
  295. FORGET NAME NEXT10 PISTOL< PREVIOUS
  296. PRIMITIVE? RELINK TOP10 UNLINK UNLINKED<
  297. VADDRESS VFIND VLIST
  298.  
  299. ::
  300. :::
  301. The command,
  302.  
  303. X> 'MISC HELP
  304.  
  305. will provide information on the use of:
  306.  
  307. COREDUMP RESTORE LISTFILE LIST LOAD
  308. SHOWCODE NOSHOWCODE % TOP10 NEXT10 DIS
  309. TRACE HELP    
  310.  
  311. :
  312. ::
  313. (This section must be present here so that all
  314.   enhancements have online documentation)
  315.  
  316. There are no enhancements in this implementation
  317.           ==
  318.  
  319. :
  320. ;F
  321.  
  322. 1, t